package br.com.anagrama;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class AnagramaActivity extends Activity {
	/** Called when the activity is first created. */

	EditText etPalavraTeste;
	Button btTestaPalavra;
	GerenciadorAnagrama gAnagrama = new GerenciadorAnagrama();
	String palavraTeste;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		gAnagrama.learquivo();
		etPalavraTeste = (EditText) findViewById(R.palavra.palavrateste);
		btTestaPalavra = (Button) findViewById(R.botao.btTestaPalavra);

		btTestaPalavra.setOnClickListener(new View.OnClickListener() {

			public void onClick(View arg0) {
				palavraTeste = etPalavraTeste.getText().toString();
				gAnagrama.testarPalavra(palavraTeste);
			}

		});

	}

}